/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package kotionokyurievna.gmail.com.mergesort.view;

import java.util.Arrays;
import kotionokyurievna.gmail.com.mergesort.logic.MergeSorter;

/**
 *
 * @author Kateryna_Reznik
 */
public class MergeSortMain {
    public static void main( String args[] ){
        int intArray[] = new int[]{1,12, 9,78, 34,90,4,8};
        MergeSorter sorter = new MergeSorter( intArray );
        System.out.println( "\n Before: \n" + Arrays.toString(intArray) );
        Thread t = new Thread( sorter );
        t.start();
        
        try {
            t.join();
        }
        catch ( InterruptedException ex ){
            System.out.println( ex );
        }
        System.out.println( "\n After: \n" + Arrays.toString(sorter.getArray()) );
    }
}
